<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{margin: 0 ;
				padding: 0;;
			}
			.zhu{
				width: 100vw;
				height: 100vh;
				display: flex;
				align-items: center;
				justify-content: center;
				border: 1px solid black;
			}
			canvas{
				border: 1px dashed blue;
				width: 500px;
				height: 500px;
			}
			
		</style>
	</head>
	<body>
		<div class="zhu">
			<canvas id="canvasone" width="500" height="500"></canvas>
		</div>
	</body>
	<script type="text/javascript">
		window.onload=function(){
			let oneCanvas=document.getElementById('canvasone');
			let ppen=oneCanvas.getContext('2d');
			
//		    ppen.lineWidth=10;
//			
//			ppen.moveTo(100,100);
//			ppen.lineTo(200,100);
//			ppen.strokeStyle='pink';
//			ppen.stroke();
//			
//			ppen.beginPath();
//			ppen.moveTo(100,200);
//			ppen.lineTo(200,200);
//			ppen.strokeStyle='green';
//			ppen.stroke();

//			ppen.beginPath();
//			ppen.arc(100,100,50,0,Math.PI/180*45,false);
//			ppen.closePath();
//			ppen.stroke();
//			
//			ppen.beginPath();
//			ppen.arc(100,100,100,0,Math.PI/180*45,false);
//			ppen.closePath();
//			ppen.stroke();

			ppen.rect(10,10,90,90);
			ppen.stroke();
			
			if(ppen.isPointInPath(80,80)){
				alert('y');
			}else{
				alert('n');
			}
			
		 }	
	</script>
</html>
